#!/bin/sh
source "${LMD_BASE_INSTALL_SCRIPT_DIR}/global/sys_check.sh"
echo "lmdprogress:10"

export CURRENT_APP_PATH="${LMD_APPS_DIR}/n8n"

echo $CURRENT_APP_PATH

echo "lmdprogress:15"

cd "$CURRENT_APP_PATH"

if [ -d "$CURRENT_APP_PATH" ]; then
    echo "lmdprogress:45"
    rm -rf "node_modules"
    # remove app files
    cd "$LMD_APPS_DIR"
    echo 'remove app files'
    rm -rf "$CURRENT_APP_PATH"
    echo "lmdprogress:100"
fi

